﻿using EAF.Utility;
using System;
using System.Collections.Generic;
using System.Text;

namespace App.Utility.FileHandle
{
    public class Config
    {

        #region 文件站 上传配置

        /// <summary>
        /// 文件站域名
        /// </summary>
        public static string FileSiteDomain { get { return AppConfig.AllValue["FileSite.Domain"]; } }

        /// <summary>
        /// 本地路径,如果为空,会使用FTP
        /// </summary>
        public static string FileSiteUpload_LocalPath { get { return AppConfig.AllValue["FileSite.UpLoad.LocalPath"]; } }

        #endregion

        #region FTP相关
        /// <summary>
        /// 文件站上传ftp地址
        /// </summary>
        public static string FileSiteUploadFtpAddressIp { get { return AppConfig.AllValue["FileSite.UpLoad.Ftp.AddressIP"]; } }
        /// <summary>
        /// 文件站上传ftp端口
        /// </summary>
        public static string FileSiteUploadFtpPort { get { return AppConfig.AllValue["FileSite.UpLoad.Ftp.Port"]; } }
        /// <summary>
        /// 文件站上传ftp用户
        /// </summary>
        public static string FileSiteUploadFtpUser { get { return AppConfig.AllValue["FileSite.UpLoad.Ftp.User"]; } }
        /// <summary>
        /// 文件站上传ftp密码
        /// </summary>
        public static string FileSiteUploadFtpPassword { get { return AppConfig.AllValue["FileSite.UpLoad.Ftp.Password"]; } }
        #endregion

        #region 上传存放路径
        /// <summary>
        /// 本站图片上传路径
        /// </summary>
        public static string FileSiteUploadImagePath { get { return AppConfig.AllValue["FileSite.UpLoad.Image"]; } }
        /// <summary>
        /// 本站Excel文件上传路径
        /// </summary>
        public static string FileSiteUploadExcelPath { get { return AppConfig.AllValue["FileSite.UpLoad.Excel"]; } }
        /// <summary>
        /// 本站Video文件上传路径
        /// </summary>
        public static string FileSiteUploadVideoPath { get { return AppConfig.AllValue["FileSite.UpLoad.Video"]; } }
        /// <summary>
        /// 本站普通文件上传路径
        /// </summary>
        public static string FileSiteUploadFilesPath { get { return AppConfig.AllValue["FileSite.UpLoad.Files"]; } }
        #endregion

        #region 下载存放路径

        /// <summary>
        /// 本站Excel文件下载路径
        /// </summary>
        public static string FileSiteDownloadExcel { get { return AppConfig.AllValue["FileSite.DownLoad.Excel"]; } }

        #endregion

        #region 上传文件大小限制(KB)
        /// <summary>
        /// 后台图片文件大小限制(KB)
        /// </summary>
        public static int FileInfoAdminImgSize { get { return AppConfig.AllValue["FileInfo.Admin.ImgSize"].ToInt(); } }
        /// <summary>
        /// Excel文件大小限制(KB)
        /// </summary>
        public static int FileInfoAdminExcelSize { get { return AppConfig.AllValue["FileInfo.Admin.ExcelSize"].ToInt(); } }
        /// <summary>
        /// 视频文件大小限制(KB)
        /// </summary>
        public static int FileInfoAdminVideoSize { get { return AppConfig.AllValue["FileInfo.Admin.VideoSize"].ToInt(); } }
        /// <summary>
        ///前端图片文件大小限制(KB)
        /// </summary>
        public static int FileInfoFrontImgSize { get { return AppConfig.AllValue["FileInfo.Front.ImgSize"].ToInt(); } }
        #endregion

        #region 文件类型
        /// <summary>
        /// 图片文件类型以逗号隔开
        /// </summary>
        public static string FileInfoImgType { get { return AppConfig.AllValue["FileInfo.ImgType"]; } }
        /// <summary>
        /// excel文件类型以逗号隔开
        /// </summary>
        public static string FileInfoExcelType { get { return AppConfig.AllValue["FileInfo.ExcelType"]; } }
        /// <summary>
        /// 视频文件类型以逗号隔开
        /// </summary>
        public static string FileInfoVideoType { get { return AppConfig.AllValue["FileInfo.VideoType"]; } }
        #endregion


    }
}
